# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=file-roller
pkgver=43.0
pkgrel=2
pkgdesc="Create and modify archives"
url="https://wiki.gnome.org/Apps/FileRoller"
arch=(loong64 x86_64)
license=(GPL)
depends=(
  dconf
  file
  json-glib
  libarchive
  libhandy
  libportal-gtk3
  unzip
  zip
)
makedepends=(
  appstream-glib
  git
  libnautilus-extension
  meson
  yelp-tools
)
optdepends=(
  'lrzip: lrzip archive support'
  'p7zip: 7z, arj, exe and encrypted zip files support'
  'squashfs-tools: squashfs image support'
  'unace: ACE archive support'
  'unrar: better RAR archive support'
)
groups=(gnome-extra)
_commit=6d57d9962efb976aa3036db965f558b96575289c  # tags/43.0^0
source=("git+https://gitlab.gnome.org/GNOME/file-roller.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
